package chenji.StrongFossil.Fossil.PuncherFossil;

import java.util.HashSet;

import org.bukkit.inventory.ItemStack;

import chenji.StrongFossil.Main;

public class PunchFossilManager {
	public HashSet<PunchFossil> PunchFossilList;

	public PunchFossilManager(HashSet<PunchFossil> list) {
		this.PunchFossilList = list;
	}

	public void loadPunchFossil() {
		Main.getConfigManager();
	}

	public boolean isPunchFossil(ItemStack i) {
		if(i==null){return false;}
		for (PunchFossil sf : this.PunchFossilList) {
			if (sf.getItemStack().getItemMeta().equals(i.getItemMeta())) {
				return true;
			}
		}
		return false;
	}

	public PunchFossil getPunchFossil(ItemStack i) {
		for (PunchFossil sf : this.PunchFossilList) {
			if (sf.getItemStack().getItemMeta().equals(i.getItemMeta())) {
				System.out.println(sf.getItemStack().getItemMeta().getDisplayName());
				return sf;
			}
		}
		System.out.println("nulllll");
		return null;
	}

	public HashSet<PunchFossil> getPunchFossilSet() {
		return this.PunchFossilList;
	}
}
